﻿///***************************************************************
/// 시  스  템 : Updms.Mny.Dac
/// 단위시스템 : MNY
/// 계      층 : Data Access Layer
/// 프로그램명 : Mny_Dac_UPDMS_MNY_BATCH_Mny4011b
/// 파  일  명 : Mny_Dac_UPDMS_MNY_BATCH_Mny4011b.cs
/// 설      명 : 월마감배치
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2010-10-11 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Reflection;
using System.Runtime.InteropServices;

using SMFramework.Data;

namespace Updms.Mny.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Mny_Dac_UPDMS_MNY_BATCH_Mny4011b : Base.AppFramework.DacBase
	{
		public Mny_Dac_UPDMS_MNY_BATCH_Mny4011b()
		{
		}

		#region NT [GetAccountOnMonthlyClose]
		/// <summary>
		/// 월마감배치 대상 저축계정 목록
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetAccountOnMonthlyClose(DataPack lo_dp)
		{
			string strSql = "usp_UPDMS_MNY_BATCH_Mny4011b_Get_Account_On_Monthly_Close";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(strSql, "UPDMS_MNY_BATCH", ds, paramArray, CommandType.StoredProcedure);
		}

		#endregion

		#region RT [Delete]
		/// <summary>
		/// 월마감된 데이터를 마감취소(삭제)한다
		/// </summary>
		/// <param name="ls_base_dt"></param>
		/// <returns></returns>
		[AutoComplete]
		public int Delete(string ls_base_ym)
		{
			string ls_curr_method = MethodBase.GetCurrentMethod().DeclaringType.ToString() + " - " + MethodBase.GetCurrentMethod().ToString();

			string strSql = "usp_UPDMS_MNY_BATCH_Mny4011b_Delete_Monthly_Close_Data";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_base_ym", ls_base_ym)
			};
			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure, ls_curr_method);
		}

		#endregion
		
	}
}
